/**
 * 
 */
package jmine.tec.utils.date;

import java.util.Calendar;

/**
 * @author takeshi
 * @version 24/08/2007
 */
public enum DatePeriodUnit {
    DAYS("period.unit.day", "day", Calendar.DAY_OF_YEAR), WEEKS("period.unit.week", "week", Calendar.WEEK_OF_YEAR), MONTHS(
            "period.unit.month", "month", Calendar.MONTH), YEARS("period.unit.year", "year", Calendar.YEAR);

    private final String messageCode;

    private final String label;

    private final int calendarField;

    /**
     * C'tor
     * 
     * @param messageCode the message code
     * @param label the label
     * @param calendarField the refering calendar field
     */
    private DatePeriodUnit(final String messageCode, final String label, final int calendarField) {
        this.messageCode = messageCode;
        this.label = label;
        this.calendarField = calendarField;
    }

    /**
     * @return the calendarField
     */
    public int getCalendarField() {
        return this.calendarField;
    }

    /**
     * @return the messageCode
     */
    public String getMessageCode() {
        return this.messageCode;
    }

    /**
     * @return the label
     */
    public String getLabel() {
        return this.label;
    }

}
